<?php
abstract class Car_Abstract {
	protected $_lights;
	protected $_alarm;
	
	public function __construct() {
	}
	
	public function setLights(Lights_Interface $_lights) {
		$this->_lights = $_lights;
	}
	
	public function turnLightsOn() {
		$this->_lights->turnOn();
	}
	
	public function turnLightsOff() {
		$this->_lights->turnOff();
	}
	
	public function startAlarm() {
		$this->_alarm->notifyDevices($this);
	}
	
	abstract public function display();
	
	protected function _setupAlarm() {
		$this->_alarm = new Alarm;	
		$this->_alarm->addDevice(new Alarm_Device_UltraLights());
		$this->_alarm->addDevice(new Alarm_Device_Sms());
	}
}
